﻿using System;
using System.IO;
using tuimg.element;

namespace tuimg.structs
{
    internal struct struct_ico_head //文件头
    {
        internal ushort reserved; // 保留
        internal ushort id_type; // ico 固定 01 00
        internal ushort id_count; // 包含图片个数
    }

    internal struct struct_ico_dir_entry //信息块
    {
        internal byte width;
        internal byte height;
        internal byte color_count; //颜色计数
        internal byte reserved; //保留
        internal ushort planes; //调色板数
        internal ushort bitcount; // 像素点二进制数
        internal uint res_bytes; // 图像数据长度 : 图像大小(w*h*4) + 40 head 头 + mask
        internal uint image_offset;
    }
    internal struct struct_ico_image_bmp
    {
        internal TuimgBmp img;
        internal TuimgGrid and;
    }
    internal struct struct_ico_image_png
    {
        internal TuimgPng img;
    }
    internal struct struct_ico_image
    {
        internal struct_ico_dir_entry entry { get; set; }
        internal object image;
    }
}
